## Rows: 4,480
## Columns: 5
## $ INDICATOR <chr> "MEATCONSUMP", "MEATCONSUMP", "MEATCONSUMP", "MEATCONSUMP",…
## $ SUBJECT <chr> "BEEF", "BEEF", "BEEF", "BEEF", "BEEF", "BEEF", "BEEF", "BE…
## $ TIME <dbl> 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,…
## $ value_lb <dbl> 0.00, 61.60, 58.22, 58.14, 56.57, 56.28, 60.52, 63.93, 59.0…
## $ country <chr> "Australia", "Australia", "Australia", "Australia", "Austra…
This new graph made it clear that most countries saw an upward trend in meat consumption and that America and Oceania appeared to have the countries with the most meat consumption.
Next I wanted to glimpse at my cardiovascular disease death rate data:
## Rows: 6,468
## Columns: 4
## $ Entity <chr> "Afghanistan", "Afghanistan", "Afghanistan", "Afghanistan",…
## $ Code <chr> "AFG", "AFG", "AFG", "AFG", "AFG", "AFG", "AFG", "AFG", "AF…
## $ Year <dbl> 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,…
## $ deathrate <dbl> 747.1105, 746.5671, 749.0690, 755.9224, 766.0657, 768.5552,…
##
## Call:
## lm(formula = deathrate ~ value_lb, data = combined_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -221.35 -99.41 -26.08 45.75 462.49
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 301.09744 3.22204 93.45 <2e-16 ***
## value_lb -1.30194 0.09762 -13.34 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 140.7 on 3582 degrees of freedom
## Multiple R-squared: 0.0473, Adjusted R-squared: 0.04704
## F-statistic: 177.9 on 1 and 3582 DF, p-value: < 2.2e-16
Looking at cardiovascular mortality rate as a function of consumption quantity, the adjusted R-squared tells me that the graph is only approximately 5% fitted to the regression line, meaning 95% of the variability is unexplained. Looking at the graph this makes sense because the values are all over the place and do not follow a single linear pattern. The p-value tells me it is a statistically significant relationship and the coefficient is slightly negative meaning that generally as consumption of meat goes up, the mortality rate goes down.
I then decided to split up the data by percentage of death rate (high and low) and observe the patterns:
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -145.75 -98.79 -57.26 70.75 343.09
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 382.5737 4.0800 93.769 <2e-16 ***
## value_lb -0.2898 0.1627 -1.781 0.0751 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 131.7 on 1790 degrees of freedom
## Multiple R-squared: 0.001768, Adjusted R-squared: 0.001211
## F-statistic: 3.171 on 1 and 1790 DF, p-value: 0.07513
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -88.694 -34.610 3.392 34.350 72.617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 168.09117 1.41673 118.647 <2e-16 ***
## value_lb -0.08096 0.03596 -2.251 0.0245 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 40.66 on 1786 degrees of freedom
## Multiple R-squared: 0.00283, Adjusted R-squared: 0.002272
## F-statistic: 5.069 on 1 and 1786 DF, p-value: 0.02448
##
## Call:
## lm(formula = deathrate ~ value_lb + SUBJECT, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -88.655 -34.613 2.956 34.099 74.501
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 169.76384 2.39959 70.747 <2e-16 ***
## value_lb -0.12505 0.04469 -2.798 0.0052 **
## SUBJECTPIG -0.61949 2.72867 -0.227 0.8204
## SUBJECTPOULTRY 2.30281 2.84150 0.810 0.4178
## SUBJECTSHEEP -3.27203 2.96047 -1.105 0.2692
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 40.66 on 1783 degrees of freedom
## Multiple R-squared: 0.004371, Adjusted R-squared: 0.002137
## F-statistic: 1.957 on 4 and 1783 DF, p-value: 0.0986
This showed me that poultry is positive and thus is higher when mortality rates are higher, however beef, pig, and sheep have negative coefficients, meaning they are lower when mortality rates are higher.
Next, I decided to go a little deeper into four percentages:
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -374.32 -105.57 -13.78 96.15 264.43
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 448.2622 5.2853 84.81 < 2e-16 ***
## value_lb 2.1595 0.2673 8.08 2.09e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 115.7 on 894 degrees of freedom
## Multiple R-squared: 0.06806, Adjusted R-squared: 0.06702
## F-statistic: 65.29 on 1 and 894 DF, p-value: 2.086e-15
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -46.008 -17.335 0.244 18.520 53.985
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 282.82704 1.01565 278.469 < 2e-16 ***
## value_lb -0.23548 0.03451 -6.823 1.65e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 23.25 on 894 degrees of freedom
## Multiple R-squared: 0.04949, Adjusted R-squared: 0.04843
## F-statistic: 46.55 on 1 and 894 DF, p-value: 1.647e-11
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -51.372 -20.098 -0.423 20.444 38.625
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 129.81025 1.14763 113.11 <2e-16 ***
## value_lb 0.02502 0.02750 0.91 0.363
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 22.75 on 890 degrees of freedom
## Multiple R-squared: 0.0009293, Adjusted R-squared: -0.0001933
## F-statistic: 0.8278 on 1 and 890 DF, p-value: 0.3631
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.405 -16.086 -0.942 15.033 36.448
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 199.74781 0.88239 226.371 <2e-16 ***
## value_lb 0.03754 0.02390 1.571 0.117
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 18.27 on 894 degrees of freedom
## Multiple R-squared: 0.002753, Adjusted R-squared: 0.001638
## F-statistic: 2.468 on 1 and 894 DF, p-value: 0.1165
## # A tibble: 1 x 4
## high `high-medium` low `low-medium`
## <dbl> <dbl> <dbl> <dbl>
## 1 0.0681 0.0495 0.000929 0.00275
##
## Call:
## lm(formula = deathrate ~ value_lb + SUBJECT, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -401.70 -107.32 -12.14 98.98 247.16
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 432.1566 9.2703 46.617 < 2e-16 ***
## value_lb 2.5145 0.2871 8.757 < 2e-16 ***
## SUBJECTPIG 13.6762 10.9988 1.243 0.21404
## SUBJECTPOULTRY -1.1322 10.8881 -0.104 0.91720
## SUBJECTSHEEP 32.7304 11.5110 2.843 0.00457 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 115.2 on 891 degrees of freedom
## Multiple R-squared: 0.07925, Adjusted R-squared: 0.07512
## F-statistic: 19.17 on 4 and 891 DF, p-value: 3.846e-15
##
## Call:
## lm(formula = deathrate ~ value_lb + SUBJECT, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -46.42 -17.81 -0.42 18.45 55.85
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 284.33361 1.75622 161.901 < 2e-16 ***
## value_lb -0.26512 0.03656 -7.251 8.98e-13 ***
## SUBJECTPIG -0.37597 2.19441 -0.171 0.8640
## SUBJECTPOULTRY 0.90278 2.19733 0.411 0.6813
## SUBJECTSHEEP -4.30571 2.27275 -1.894 0.0585 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 23.22 on 891 degrees of freedom
## Multiple R-squared: 0.05572, Adjusted R-squared: 0.05148
## F-statistic: 13.14 on 4 and 891 DF, p-value: 2.087e-10
##
## Call:
## lm(formula = deathrate ~ value_lb, data = combined_data1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -221.58 -99.44 -26.12 45.63 462.29
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 301.33661 3.22174 93.53 <2e-16 ***
## value_lb -1.30293 0.09759 -13.35 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 140.7 on 3578 degrees of freedom
## Multiple R-squared: 0.04745, Adjusted R-squared: 0.04718
## F-statistic: 178.2 on 1 and 3578 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -204.61 -102.42 -25.31 40.92 453.26
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 297.5667 7.3465 40.505 < 2e-16 ***
## value_lb -0.9795 0.2136 -4.586 5.17e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 142.6 on 893 degrees of freedom
## Multiple R-squared: 0.02301, Adjusted R-squared: 0.02191
## F-statistic: 21.03 on 1 and 893 DF, p-value: 5.168e-06
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -215.44 -98.31 -31.48 53.27 454.03
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 314.5354 7.0927 44.346 < 2e-16 ***
## value_lb -1.9380 0.2433 -7.967 4.94e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 139.4 on 893 degrees of freedom
## Multiple R-squared: 0.06636, Adjusted R-squared: 0.06532
## F-statistic: 63.47 on 1 and 893 DF, p-value: 4.938e-15
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -201.04 -89.15 -27.30 40.09 435.75
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 346.7816 6.9016 50.25 <2e-16 ***
## value_lb -2.0599 0.1471 -14.00 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 130.6 on 893 degrees of freedom
## Multiple R-squared: 0.1801, Adjusted R-squared: 0.1792
## F-statistic: 196.1 on 1 and 893 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -193.21 -102.62 -35.15 50.36 444.25
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 272.6206 5.6404 48.333 <2e-16 ***
## value_lb -0.1195 0.5060 -0.236 0.813
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 144.3 on 893 degrees of freedom
## Multiple R-squared: 6.247e-05, Adjusted R-squared: -0.001057
## F-statistic: 0.05579 on 1 and 893 DF, p-value: 0.8133
Only the first three were statistically significant, and each showed a slightly negative coefficient.
Then I looked at each additional variable to see which one had the biggest impact:
##
## Call:
## lm(formula = deathrate ~ value_lb + country, data = combined_data1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -168.751 -31.364 -3.701 29.060 122.822
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 253.62456 4.56318 55.581 < 2e-16 ***
## value_lb -0.22063 0.03803 -5.802 7.13e-09 ***
## countryAustralia -78.91967 6.05109 -13.042 < 2e-16 ***
## countryBrazil -6.83437 6.05302 -1.129 0.25894
## countryCanada -91.73913 6.04771 -15.169 < 2e-16 ***
## countryChile -76.36536 6.06354 -12.594 < 2e-16 ***
## countryChina 41.18282 6.10022 6.751 1.71e-11 ***
## countryColombia -61.06501 6.11427 -9.987 < 2e-16 ***
## countryEgypt 295.60460 6.17212 47.894 < 2e-16 ***
## countryEthiopia 33.88984 6.23227 5.438 5.76e-08 ***
## countryIndia 35.90502 6.23700 5.757 9.30e-09 ***
## countryIndonesia 85.93903 6.21242 13.833 < 2e-16 ***
## countryIran 70.20243 6.14302 11.428 < 2e-16 ***
## countryIsrael -78.79616 6.04724 -13.030 < 2e-16 ***
## countryJapan -132.50570 6.16399 -21.497 < 2e-16 ***
## countryKazakhstan 337.46358 6.09759 55.344 < 2e-16 ***
## countryMexico -82.66179 6.08997 -13.573 < 2e-16 ***
## countryNew Zealand -52.64711 6.04754 -8.706 < 2e-16 ***
## countryNigeria -36.45828 6.22250 -5.859 5.08e-09 ***
## countryNorway -61.91149 6.07471 -10.192 < 2e-16 ***
## countryPakistan 181.15765 6.19836 29.227 < 2e-16 ***
## countryParaguay -17.52419 6.08099 -2.882 0.00398 **
## countryPeru -119.54058 6.11981 -19.533 < 2e-16 ***
## countryPhilippines 100.97308 6.14715 16.426 < 2e-16 ***
## countryRussia 347.06619 6.08618 57.025 < 2e-16 ***
## countrySouth Africa 11.78248 6.09662 1.933 0.05336 .
## countrySwitzerland -92.80526 6.06148 -15.311 < 2e-16 ***
## countryThailand -86.65175 6.15419 -14.080 < 2e-16 ***
## countryTurkey -16.11479 6.15448 -2.618 0.00887 **
## countryUkraine 354.72083 6.11609 57.998 < 2e-16 ***
## countryUnited Kingdom -52.24032 6.05963 -8.621 < 2e-16 ***
## countryUnited States -46.55132 6.06122 -7.680 2.04e-14 ***
## countryVietnam 34.98040 6.12522 5.711 1.22e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 45.25 on 3547 degrees of freedom
## Multiple R-squared: 0.9023, Adjusted R-squared: 0.9014
## F-statistic: 1024 on 32 and 3547 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb + country + SUBJECT, data = combined_data1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -165.959 -30.992 -3.496 28.516 121.806
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 258.85292 4.92290 52.581 < 2e-16 ***
## value_lb -0.31804 0.04558 -6.978 3.57e-12 ***
## countryAustralia -78.35709 6.04271 -12.967 < 2e-16 ***
## countryBrazil -7.51938 6.04548 -1.244 0.21365
## countryCanada -91.95878 6.03785 -15.230 < 2e-16 ***
## countryChile -77.50831 6.06062 -12.789 < 2e-16 ***
## countryChina 39.12506 6.11327 6.400 1.76e-10 ***
## countryColombia -63.38024 6.13340 -10.334 < 2e-16 ***
## countryEgypt 292.43837 6.21609 47.045 < 2e-16 ***
## countryEthiopia 30.02691 6.30173 4.765 1.97e-06 ***
## countryIndia 31.99240 6.30844 5.071 4.15e-07 ***
## countryIndonesia 82.29205 6.27350 13.117 < 2e-16 ***
## countryIran 67.43243 6.17453 10.921 < 2e-16 ***
## countryIsrael -78.89713 6.03716 -13.069 < 2e-16 ***
## countryJapan -134.72447 6.18043 -21.799 < 2e-16 ***
## countryKazakhstan 335.45776 6.10949 54.908 < 2e-16 ***
## countryMexico -84.50960 6.09857 -13.857 < 2e-16 ***
## countryNew Zealand -52.46100 6.03761 -8.689 < 2e-16 ***
## countryNigeria -40.21634 6.28784 -6.396 1.80e-10 ***
## countryNorway -63.39349 6.07667 -10.432 < 2e-16 ***
## countryPakistan 177.67117 6.25349 28.412 < 2e-16 ***
## countryParaguay -19.16643 6.08568 -3.149 0.00165 **
## countryPeru -121.95006 6.14134 -19.857 < 2e-16 ***
## countryPhilippines 98.14346 6.18045 15.880 < 2e-16 ***
## countryRussia 345.30225 6.09313 56.671 < 2e-16 ***
## countrySouth Africa 9.79606 6.10810 1.604 0.10885
## countrySwitzerland -93.87408 6.05765 -15.497 < 2e-16 ***
## countryThailand -89.57996 6.19049 -14.471 < 2e-16 ***
## countryTurkey -19.04702 6.19091 -3.077 0.00211 **
## countryUkraine 352.37422 6.13601 57.427 < 2e-16 ***
## countryUnited Kingdom -53.23776 6.05499 -8.792 < 2e-16 ***
## countryUnited States -45.49246 6.05727 -7.510 7.42e-14 ***
## countryVietnam 32.48245 6.14907 5.282 1.35e-07 ***
## SUBJECTPIG -1.33274 2.14411 -0.622 0.53426
## SUBJECTPOULTRY 3.23211 2.18524 1.479 0.13921
## SUBJECTSHEEP -6.48524 2.32907 -2.784 0.00539 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 45.18 on 3544 degrees of freedom
## Multiple R-squared: 0.9027, Adjusted R-squared: 0.9017
## F-statistic: 939.3 on 35 and 3544 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb + country + SUBJECT + Year,
## data = combined_data1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -174.067 -13.721 -2.071 16.260 119.195
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.355e+03 1.320e+02 63.290 < 2e-16 ***
## value_lb -6.034e-03 3.215e-02 -0.188 0.851125
## countryAustralia -8.016e+01 4.208e+00 -19.047 < 2e-16 ***
## countryBrazil -5.325e+00 4.210e+00 -1.265 0.206026
## countryCanada -9.126e+01 4.205e+00 -21.701 < 2e-16 ***
## countryChile -7.385e+01 4.221e+00 -17.494 < 2e-16 ***
## countryChina 4.572e+01 4.259e+00 10.734 < 2e-16 ***
## countryColombia -5.596e+01 4.273e+00 -13.097 < 2e-16 ***
## countryEgypt 3.026e+02 4.332e+00 69.843 < 2e-16 ***
## countryEthiopia 4.240e+01 4.393e+00 9.651 < 2e-16 ***
## countryIndia 4.452e+01 4.398e+00 10.123 < 2e-16 ***
## countryIndonesia 9.397e+01 4.373e+00 21.488 < 2e-16 ***
## countryIran 7.630e+01 4.303e+00 17.734 < 2e-16 ***
## countryIsrael -7.857e+01 4.205e+00 -18.688 < 2e-16 ***
## countryJapan -1.295e+02 4.305e+00 -30.078 < 2e-16 ***
## countryKazakhstan 3.419e+02 4.256e+00 80.326 < 2e-16 ***
## countryMexico -7.859e+01 4.248e+00 -18.499 < 2e-16 ***
## countryNew Zealand -5.306e+01 4.205e+00 -12.618 < 2e-16 ***
## countryNigeria -2.818e+01 4.383e+00 -6.429 1.46e-10 ***
## countryNorway -5.865e+01 4.233e+00 -13.856 < 2e-16 ***
## countryPakistan 1.888e+02 4.359e+00 43.321 < 2e-16 ***
## countryParaguay -1.391e+01 4.239e+00 -3.280 0.001046 **
## countryPeru -1.142e+02 4.279e+00 -26.697 < 2e-16 ***
## countryPhilippines 1.072e+02 4.307e+00 24.892 < 2e-16 ***
## countryRussia 3.510e+02 4.245e+00 82.684 < 2e-16 ***
## countrySouth Africa 1.616e+01 4.255e+00 3.797 0.000149 ***
## countrySwitzerland -9.045e+01 4.219e+00 -21.438 < 2e-16 ***
## countryThailand -8.020e+01 4.314e+00 -18.591 < 2e-16 ***
## countryTurkey -9.656e+00 4.314e+00 -2.238 0.025281 *
## countryUkraine 3.599e+02 4.275e+00 84.182 < 2e-16 ***
## countryUnited Kingdom -5.004e+01 4.217e+00 -11.866 < 2e-16 ***
## countryUnited States -4.888e+01 4.219e+00 -11.587 < 2e-16 ***
## countryVietnam 4.048e+01 4.284e+00 9.449 < 2e-16 ***
## SUBJECTPIG -2.529e-02 1.493e+00 -0.017 0.986492
## SUBJECTPOULTRY 6.132e-02 1.523e+00 0.040 0.967880
## SUBJECTSHEEP -1.230e-01 1.625e+00 -0.076 0.939661
## Year -4.048e+00 6.598e-02 -61.350 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 31.46 on 3543 degrees of freedom
## Multiple R-squared: 0.9528, Adjusted R-squared: 0.9523
## F-statistic: 1987 on 36 and 3543 DF, p-value: < 2.2e-16
Country had the biggest impact on the r-squared value meaning it explained most of the variation, with year explaining most of the remainder. Looking at the coefficients, it is obvious that countries have dramatically different trends.
Next, I repeated plots 6&7, but instead I divided the percentages by meat consumption rates instead of CVD mortality rates:
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -227.30 -102.43 -35.67 49.95 454.28
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 336.983 6.289 53.58 <2e-16 ***
## value_lb -2.002 0.141 -14.20 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 145.2 on 1916 degrees of freedom
## Multiple R-squared: 0.09516, Adjusted R-squared: 0.09469
## F-statistic: 201.5 on 1 and 1916 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -243.35 -93.10 -18.35 50.63 445.45
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 263.3677 5.0568 52.082 < 2e-16 ***
## value_lb 4.2796 0.8063 5.307 1.26e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 131.7 on 1663 degrees of freedom
## Multiple R-squared: 0.01666, Adjusted R-squared: 0.01607
## F-statistic: 28.17 on 1 and 1663 DF, p-value: 1.261e-07
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -186.06 -80.37 -20.55 46.78 455.40
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 330.946 7.671 43.14 <2e-16 ***
## value_lb -1.877 0.136 -13.80 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 116 on 1019 degrees of freedom
## Multiple R-squared: 0.1575, Adjusted R-squared: 0.1567
## F-statistic: 190.5 on 1 and 1019 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -256.77 -123.33 -57.96 63.95 463.12
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 414.5378 25.0485 16.549 < 2e-16 ***
## value_lb -5.1753 0.9957 -5.198 2.5e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 171.7 on 895 degrees of freedom
## Multiple R-squared: 0.0293, Adjusted R-squared: 0.02821
## F-statistic: 27.01 on 1 and 895 DF, p-value: 2.502e-07
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -206.32 -92.62 -20.17 47.87 446.34
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 288.594 8.925 32.336 <2e-16 ***
## value_lb -9.992 5.240 -1.907 0.0569 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 134.4 on 768 degrees of freedom
## Multiple R-squared: 0.004712, Adjusted R-squared: 0.003416
## F-statistic: 3.636 on 1 and 768 DF, p-value: 0.05692
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -260.34 -89.89 -12.55 56.41 447.58
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 232.472 11.064 21.011 < 2e-16 ***
## value_lb 7.732 1.316 5.875 5.96e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 128.3 on 893 degrees of freedom
## Multiple R-squared: 0.03721, Adjusted R-squared: 0.03613
## F-statistic: 34.52 on 1 and 893 DF, p-value: 5.964e-09
All the graphs except for the low graph had p-values that indicated statistical significance. The high and high-medium graphs both had a negative coefficient, however the low-medium graph had a positive coefficent.
I then decided to try splitting countries into different income brackets:
##
## Call:
## lm(formula = deathrate ~ value_lb, data = perc_combined_test2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -181.189 -65.125 -5.169 49.131 305.830
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 277.9238 5.7782 48.099 < 2e-16 ***
## value_lb -1.1853 0.1794 -6.606 1.1e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 90.9 on 458 degrees of freedom
## Multiple R-squared: 0.087, Adjusted R-squared: 0.08501
## F-statistic: 43.65 on 1 and 458 DF, p-value: 1.095e-10
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -83.082 -27.974 -5.135 31.011 92.856
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 175.0484 7.2248 24.229 <2e-16 ***
## value_lb 0.1302 0.1633 0.797 0.427
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 44.33 on 114 degrees of freedom
## Multiple R-squared: 0.005542, Adjusted R-squared: -0.003181
## F-statistic: 0.6353 on 1 and 114 DF, p-value: 0.4271
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -97.787 -48.713 -1.584 49.631 107.538
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 243.2467 7.8070 31.157 <2e-16 ***
## value_lb -0.2131 0.1983 -1.075 0.285
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 57.39 on 114 degrees of freedom
## Multiple R-squared: 0.01003, Adjusted R-squared: 0.001345
## F-statistic: 1.155 on 1 and 114 DF, p-value: 0.2848
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -119.114 -32.194 -4.142 22.042 135.086
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 315.3780 7.1309 44.227 <2e-16 ***
## value_lb 0.0832 0.5855 0.142 0.887
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 62.12 on 110 degrees of freedom
## Multiple R-squared: 0.0001835, Adjusted R-squared: -0.008906
## F-statistic: 0.02019 on 1 and 110 DF, p-value: 0.8873
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -187.27 -89.04 -32.27 52.64 288.82
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 297.0315 16.7322 17.752 <2e-16 ***
## value_lb -1.3174 0.7771 -1.695 0.0928 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 129.3 on 114 degrees of freedom
## Multiple R-squared: 0.02459, Adjusted R-squared: 0.01603
## F-statistic: 2.874 on 1 and 114 DF, p-value: 0.09276
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -168.84 -67.72 -4.04 45.43 300.84
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 279.1248 12.8838 21.665 <2e-16 ***
## value_lb -1.0107 0.3562 -2.837 0.0054 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 92.53 on 113 degrees of freedom
## Multiple R-squared: 0.0665, Adjusted R-squared: 0.05824
## F-statistic: 8.05 on 1 and 113 DF, p-value: 0.005396
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -175.575 -62.590 -9.487 50.685 268.590
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 296.5439 12.1035 24.501 < 2e-16 ***
## value_lb -2.1093 0.4259 -4.953 2.59e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 86.81 on 113 degrees of freedom
## Multiple R-squared: 0.1784, Adjusted R-squared: 0.1711
## F-statistic: 24.53 on 1 and 113 DF, p-value: 2.586e-06
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -161.347 -56.743 -6.648 51.371 285.332
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 305.0184 12.2700 24.859 < 2e-16 ***
## value_lb -1.6009 0.2837 -5.643 1.25e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 84.58 on 113 degrees of freedom
## Multiple R-squared: 0.2199, Adjusted R-squared: 0.213
## F-statistic: 31.85 on 1 and 113 DF, p-value: 1.255e-07
##
## Call:
## lm(formula = deathrate ~ value_lb, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -158.51 -66.92 -12.83 50.15 311.34
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 254.8214 10.3347 24.657 <2e-16 ***
## value_lb -0.4415 0.8109 -0.544 0.587
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 95.64 on 113 degrees of freedom
## Multiple R-squared: 0.002617, Adjusted R-squared: -0.00621
## F-statistic: 0.2964 on 1 and 113 DF, p-value: 0.5872